<?php
 do { if (PHP5) { if (class_exists('SmartTemplate', false)) { break; } } else { if (class_exists('SmartTemplate')) { break; } } $viewConfig = FLEA::getAppInf('viewConfig'); if (!isset($viewConfig['smartDir'])) { FLEA::loadClass('FLEA_View_Exception_NotConfigurationSmartTemplate'); return __THROW(new FLEA_View_Exception_NotConfigurationSmartTemplate()); } $filename = $viewConfig['smartDir'] . '/class.smarttemplate.php'; if (!is_readable($filename)) { FLEA::loadClass('FLEA_View_Exception_InitSmartTemplateFailed'); return __THROW(new FLEA_View_Exception_InitSmartTemplateFailed($filename)); } require($filename); } while (false); class FLEA_View_SmartTemplate extends SmartTemplate { function FLEA_View_SmartTemplate() { parent::SmartTemplate(); $viewConfig = FLEA::getAppInf('viewConfig'); if (is_array($viewConfig)) { foreach ($viewConfig as $key => $value) { if (isset($this->{$key})) { $this->{$key} = $value; } } } } function display($tpl) { $this->tpl_file = $tpl; $this->output(); } } 